import HTTPREQUEST from "./http"

// 获取用户信息和学校信息
export const getUserAndSchoolInfo = ({ url, data, header }) => HTTPREQUEST.get(url, data, header)

//获取todo的列表信息
export const getTodoInfo = ({ url, data, header }) => HTTPREQUEST.get(url, data, header)

// 记录各消息类型最后读取时间
export const getLastReadTime = ({ url, data, header }) => HTTPREQUEST.post(url, data, header)

//根据用户ID获取各类型未读消息
export const reqNewRemindCount = ({ url, data, header }) => HTTPREQUEST.get(url, data, header)

// 获取系统消息列表
export const reqSystemMes = ({ url, data, header }) => HTTPREQUEST.get(url, data, header)

// 批量删除
export const reqDelAllChoose = ({ url, data, header }) => HTTPREQUEST.delete(url, data, header)

// 批量已读
export const reqReadAllChoose = ({ url, data, header }) => HTTPREQUEST.put(url, data, header)

// 删除系统消息
export const reqDelSystemMes = ({ url, data, header }) => HTTPREQUEST.post(url, data, header)


// 屏蔽系统消息
export const reqShiledSystemMes = ({ url, data, header }) => HTTPREQUEST.post(url, data, header)

// 获取屏蔽设置
export const reqSettingInfo = ({ url, data, header }) => HTTPREQUEST.get(url, data, header)

// 获取在线交流设置
export const reqShiledSetting = ({ url, data, header }) => HTTPREQUEST.get(url, data, header)

// 单个switch的请求
export const reqLevelTwoCheck = ({ url, data, header }) => HTTPREQUEST.post(url, data, header)

export const getData = (data) => HTTPREQUEST.get('/api/board', data)
export const postData = (data, header) => HTTPREQUEST.post('/api/board', data, header)
export const putData = (data, header) => HTTPREQUEST.put('/api/board', data, header)
export const delData = (data, header) => HTTPREQUEST.delete('/api/board', data, header)

export const HttpGet = ({ url, data = {}, header = {}, load = false }) => HTTPREQUEST.get(url, data, header, load)
export const HttpPost = ({ url, data = {}, header = {}, load = false }) => HTTPREQUEST.post(url, data, header, load)
export const HttpPut = ({ url, data = {}, header = {}, load = false }) => HTTPREQUEST.put(url, data, header, load)
export const HttpDelete = ({ url, data = {}, header = {}, load = false }) => HTTPREQUEST.delete(url, data, header, load)

export const transmitFormData = (data) => HTTPREQUEST.transmitFormData(data) //小程序内formData请求（小程序不支持formData请求，走校园通代理）


//=========================================通讯录接口=============================================================
/**根据token获取个人信息*/
export const API_getUserInfo = (data, header) => HTTPREQUEST.get('/api/Common/GetUserInfo', data, header)

/**获取通讯录-左侧菜单栏数据列表*/
export const API_getContactBook = (data, header) => HTTPREQUEST.get('/api/ContactV2/GetContactBook', data, header)

/**获取最近联系人成员列表*/
export const API_getRecentContactList = (data, header) => HTTPREQUEST.get('/api/ContactV2/GetRecentContactList', data, header)

/**添加或清空最近联系人*/
export const API_OperateRecentContact = (data, header) => HTTPREQUEST.post('/api/Contact/OperateRecentContact', data, header)

/**获取常用联系人成员列表*/
export const API_getFrequentContactList = (data, header) => HTTPREQUEST.get('/api/ContactV2/GetFrequentContactList', data, header)

/**通讯录搜索--返回全校师生（包含家长）基本信息*/
export const API_searchContact = (data, header) => HTTPREQUEST.get('/api/Contact/SearchContact', data, header)

/**添加或移除常用联系人*/
export const API_OperateFrequentContact = (data, header) => HTTPREQUEST.post('/api/Contact/OperateFrequentContact', data, header)

/**获取全校师生及其内部各层级数据接口*/
export const API_getAllSchoolList = (data, header) => HTTPREQUEST.get('/api/ContactV2/GetAllSchoolList', data, header)

/**获取我的班级列表信息*/
export const API_getMyClassList = (data, header) => HTTPREQUEST.get('/api/ContactV2/GetMyClassList', data, header)

/**【学生端&家长端】-获取某一班级下所有用户信息*/
export const API_getStuClassMemberList = (data, header) => HTTPREQUEST.get('/api/Contact/GetStuClassMemberList', data, header)

/**获取学生家长分类列表*/
export const API_getStuParentClassList = (data, header) => HTTPREQUEST.get('/api/ContactV2/GetStuParentClassList', data, header)

/**获取某一班级下所有用户信息(可获取学生和家长信息，classmembertype为所要获取的班级成员类型 2为学生 3为家长)*/
export const API_getClassMemberList = (data, header) => HTTPREQUEST.get('/api/Contact/GetClassMemberList', data, header)

/**获取“我的教师组”及其内部各层级数据接口*/
export const API_getMyTeacherGroupList = (data, header) => HTTPREQUEST.get('/api/ContactV2/GetMyTeacherGroupList', data, header)

/**获取学校组织结构信息*/
export const API_getOrganizationInfo = (data, header) => HTTPREQUEST.get('/api/ContactV2/GetOrganizationInfo', data, header)

/**获取学校组织结构某一部门成员列表信息*/
export const API_getDepartmentMember = (data, header) => HTTPREQUEST.get('/api/Contact/GetDepartmentMember', data, header)

/**获取学校管理员全部身份类别*/
export const API_getAllAdminIdentity = (data, header) => HTTPREQUEST.get('/api/Contact/GetAllAdminIdentity', data, header)

/**获取学校管理员某一身份类别下所有成员信息*/
export const API_getAdminMember = (data, header) => HTTPREQUEST.get('/api/Contact/GetAdminMember', data, header)

/**获取当前用户所在讨论组列表*/
export const API_getDiscussionGroup = (data, header) => HTTPREQUEST.get('/api/ContactV2/GetDiscussionGroup', data, header)

/**获取某一讨论组所有成员列表*/
export const API_getDiscussionGroupMember = (data, header) => HTTPREQUEST.get('/api/Contact/GetDiscussionGroupMember', data, header)

/**获取某一用户的详细联系信息*/
export const API_getContactInfo = (data, header) => HTTPREQUEST.get('/api/Contact/GetContactInfo', data, header)

/**新建/重命名/解散讨论组+主动退出/删除讨论组里面某个一个成员*/
export const API_OperateDiscussionGroup = (data, header) => HTTPREQUEST.post('/api/Contact/OperateDiscussionGroup', data, header)
//================================================================================================================================
